function JCPopup(t){if(!t)t={};this.suffix=t.suffix?"_"+t.suffix.toString().toLowerCase():"";this.div_id="bx_popup_form_div"+this.suffix;this.overlay_id="bx_popup_overlay"+this.suffix;this.form_name="bx-popup-form"+this.suffix;this.class_name="bx-popup-form";this.url="";this.zIndex=t.zIndex||1020;this.arParams=null;this.bDenyClose=false;this.bDenyEscKey=false;this.__arRuntimeResize={};this.bodyOverflow="";this.currentScroll=0;this.div=null;this.div_inner=null;this.x=0;this.y=0;this.error_dy=null;this.arAdditionalResize=[];this.onClose=[];var e=this;window["JCPopup_OnKeyPress"+this.suffix]=function(t){e.__OnKeyPress(t)};window["JCPopup_OverlayResize"+this.suffix]=function(t){e.OverlayResize(t)};window["JCPopup_AjaxAction"+this.suffix]=function(t){e.AjaxAction(t)};window["JCPopup_AjaxPostAction"+this.suffix]=function(t){e.__AjaxPostAction(t)};window["JCPopup_stopResize"+this.suffix]=function(t){e.stopResize(t)};window["JCPopup_startResize"+this.suffix]=function(t){e.startResize(t)};window["JCPopup_doResize"+this.suffix]=function(t){e.doResize(t)};jsExtLoader.jsPopup_name="jsPopup"+this.suffix}JCPopup.prototype.addOnClose=function(t){this.onClose[this.onClose.length]=t};JCPopup.prototype.addAdditionalResize=function(t){this.arAdditionalResize[this.arAdditionalResize.length]=document.getElementById(t)};JCPopup.prototype.clearAdditionalResize=function(){this.arAdditionalResize=[]};JCPopup.prototype.DenyClose=function(t){if(t!==false)t=true;this.bDenyClose=t;if(!this.obSaveButton){this.obSaveButton=document.getElementById("btn_popup_save"+this.suffix);this.obCloseButton=document.getElementById("btn_popup_close"+this.suffix);this.obCancelButton=document.getElementById("btn_popup_cancel"+this.suffix)}if(this.obSaveButton)this.obSaveButton.disabled=t;if(this.obCloseButton)this.obCloseButton.disabled=t;if(this.obCancelButton)this.obCancelButton.disabled=t};JCPopup.prototype.AllowClose=function(){this.DenyClose(false)};JCPopup.prototype.__OnKeyPress=function(t){if(this.bDenyEscKey)return;if(!t)t=window.event;if(!t)return;if(this.bDenyClose)return;if(t.keyCode==27){jsUtils.removeEvent(document,"keypress",window["JCPopup_OnKeyPress"+this.suffix]);this.CloseDialog()}};JCPopup.prototype.AjaxAction=function(t){CloseWaitWindow();if(this.suffix)jsPopup.bDenyClose=true;var e=document.body.appendChild(document.createElement("DIV"));e.id=this.div_id;e.className=this.class_name;e.style.position="absolute";e.style.zIndex=this.zIndex;e.innerHTML=t;if(null!=this.arParams.height)e.style.height=this.arParams.height+"px";if(null!=this.arParams.width)e.style.width=this.arParams.width+"px";var i=jsUtils.GetWindowInnerSize();var s=jsUtils.GetWindowScrollPos();var n=parseInt(s.scrollLeft+i.innerWidth/2-e.offsetWidth/2);var o=parseInt(s.scrollTop+i.innerHeight/2-e.offsetHeight/2);var r=BX.ZIndexManager.register(e);if(r&&this.overlay){BX.ZIndexManager.unregister(this.overlay);r.setOverlay(this.overlay)}jsFloatDiv.Show(e,n,o,5,true);jsUtils.addEvent(document,"keypress",window["JCPopup_OnKeyPress"+this.suffix]);this.div=e;this.div_inner=document.getElementById("bx_popup_content"+this.suffix);if(this.div_inner){if(this.div.style.width)this.div_inner.style.width=parseInt(parseInt(this.div.style.width)-12)+"px";if(this.div.style.height){var a=["bx_popup_title","bx_popup_description_container","bx_popup_buttons"];var h=0;for(var l=0;l<a.length;l++){var p=document.getElementById(a[l]+this.suffix);if(p)h+=p.offsetHeight}this.div_inner.style.height=parseInt(parseInt(this.div.style.height)-h-16)+"px"}}var u=this;setTimeout(function(){u.AdjustShadow()},10);if(this.arParams.resize&&null!=this.div&&null!=this.div_inner)this.createResizer();return e};JCPopup.prototype.__AjaxPostAction=function(t){CloseWaitWindow();if(this.suffix)jsPopup.bDenyClose=true;this.div.innerHTML=t;this.div_inner=document.getElementById("bx_popup_content"+this.suffix);this.AdjustShadow();if(this.arParams.resize&&null!=this.div&&null!=this.div_inner)this.createResizer()};JCPopup.prototype.ShowDialog=function(t,e){if(document.getElementById(this.div_id))this.CloseDialog();if(!e)e={};if(null==e.resize)e.resize=true;if(!e.min_width)e.min_width=250;if(!e.min_height)e.min_height=200;var i=t.indexOf("?");if(i==-1)t+="?mode=public";else t=t.substring(0,i)+"?mode=public&"+t.substring(i+1);this.check_url=i==-1?t:t.substring(0,i);if(e.resize&&null!=this.__arRuntimeResize[this.check_url]){e.width=this.__arRuntimeResize[this.check_url].width;e.height=this.__arRuntimeResize[this.check_url].height;var s=t.indexOf("bxpiheight");if(s==-1)t+=(i==-1?"?":"&")+"bxpiheight="+this.__arRuntimeResize[this.check_url].iheight;else t=t.substring(0,s)+"bxpiheight="+this.__arRuntimeResize[this.check_url].iheight}this.url=t;this.arParams=e;this.CreateOverlay();jsExtLoader.onajaxfinish=window["JCPopup_AjaxAction"+this.suffix];if(e["postData"])jsExtLoader.startPost(t,e["postData"]);else jsExtLoader.start(t)};JCPopup.prototype.RemoveOverlay=function(){if(this.overlay){BX.ZIndexManager.unregister(this.overlay);this.overlay.parentNode.removeChild(this.overlay)}jsUtils.removeEvent(window,"resize",window["JCPopup_OverlayResize"+this.suffix])};JCPopup.prototype.OverlayResize=function(){if(!this.overlay)return;var t=jsUtils.GetWindowScrollSize();this.overlay.style.width=t.scrollWidth+"px"};JCPopup.prototype.CreateOverlay=function(){var t=new COpacity;if(!t.GetOpacityProperty())return;this.overlay=document.body.appendChild(document.createElement("DIV"));this.overlay.className="bx-popup-overlay";this.overlay.id=this.overlay_id;this.overlay.style.zIndex=this.zIndex-5;BX.ZIndexManager.register(this.overlay);var e=jsUtils.GetWindowScrollSize();this.overlay.style.width=e.scrollWidth+"px";this.overlay.style.height=e.scrollHeight+"px";jsUtils.addEvent(window,"resize",window["JCPopup_OverlayResize"+this.suffix])};JCPopup.prototype.CloseDialog=function(){jsUtils.onCustomEvent("OnBeforeCloseDialog",this.suffix);for(var t=0;t<this.onClose.length;t++)this.onClose[t]();if(this.bDenyClose)return false;if(this.suffix)jsPopup.bDenyClose=false;jsUtils.removeEvent(document,"keypress",window["JCPopup_OnKeyPress"+this.suffix]);var e=document.getElementById(this.div_id);if(!e)return;jsFloatDiv.Close(e);BX.ZIndexManager.unregister(e);e.parentNode.removeChild(e);this.clearAdditionalResize();this.RemoveOverlay();return true};JCPopup.prototype.GetParameters=function(t){if(null==t)var e=document.forms[this.form_name];else var e=document.forms[t];if(!e)return"";var i,s="";var n=e.elements.length;var o="";for(i=0;i<n;i++){if(s!="")o="&";var r=e.elements[i];if(r.disabled)continue;switch(r.type.toLowerCase()){case"text":case"textarea":case"password":case"hidden":if(null==t&&r.name.substr(r.name.length-4)=="_alt"&&e.elements[r.name.substr(0,r.name.length-4)])break;s+=o+r.name+"="+encodeURIComponent(r.value);break;case"radio":if(r.checked)s+=o+r.name+"="+encodeURIComponent(r.value);break;case"checkbox":s+=o+r.name+"="+encodeURIComponent(r.checked?"Y":"N");break;case"select-one":var a="";if(null==t&&e.elements[r.name+"_alt"]&&r.selectedIndex==0)a=e.elements[r.name+"_alt"].value;else a=r.value;s+=o+r.name+"="+encodeURIComponent(a);break;case"select-multiple":var h,l=false;var p=r.options.length;for(h=0;h<p;h++){if(r.options[h].selected){s+=o+r.name+"="+encodeURIComponent(r.options[h].value);l=true}}if(!l)s+=o+r.name+"=";break;default:break}}if(null!=this.arParams&&this.arParams.resize&&this.div_inner){var u=parseInt(this.div_inner.style.width);var d=parseInt(this.div_inner.style.height);if(u>0)s+="&bxpiwidth="+u;if(d>0)s+="&bxpiheight="+d}return s};JCPopup.prototype.PostParameters=function(t){var e=this;jsExtLoader.onajaxfinish=window["JCPopup_AjaxPostAction"+this.suffix];ShowWaitWindow();var i=this.url;if(null!=t){index=i.indexOf("?");if(index==-1)i+="?"+t;else i=i.substring(0,index)+"?"+t+"&"+i.substring(index+1)}jsExtLoader.startPost(i,this.GetParameters())};JCPopup.prototype.AdjustShadow=function(){if(this.div)jsFloatDiv.AdjustShadow(this.div)};JCPopup.prototype.HideShadow=function(){if(this.div)jsFloatDiv.HideShadow(this.div)};JCPopup.prototype.UnhideShadow=function(){if(this.div)jsFloatDiv.UnhideShadow(this.div)};JCPopup.prototype.DragPanel=function(t,e){var i=jsUtils.FindParentObject(e,"div");i.style.left=i.offsetLeft+"px";i.style.top=i.offsetTop+"px";jsFloatDiv.StartDrag(t,i)};JCPopup.prototype.createResizer=function(){this.diff_x=null;this.diff_y=null;this.arPos=jsUtils.GetRealPos(this.div);var t=parseInt(jsUtils.GetStyleValue(this.div,jsUtils.IsIE()?"zIndex":"z-index"))+1;this.obResizer=document.createElement("DIV");this.obResizer.className="bxresizer";this.obResizer.style.position="absolute";this.obResizer.style.zIndex=t;this.obResizer.onmousedown=window["JCPopup_startResize"+this.suffix];this.div.appendChild(this.obResizer)};JCPopup.prototype.startResize=function(t){if(!t)t=window.event;this.wndSize=jsUtils.GetWindowScrollPos();this.wndSize.innerWidth=jsUtils.GetWindowInnerSize().innerWidth;this.x=t.clientX+this.wndSize.scrollLeft;this.y=t.clientY+this.wndSize.scrollTop;this.obDescr=document.getElementById("bx_popup_description_container"+this.suffix);if(jsUtils.IsIE()){this.arPos=this.div.getBoundingClientRect();this.arPos={left:this.arPos.left+this.wndSize.scrollLeft,top:this.arPos.top+this.wndSize.scrollTop,right:this.arPos.right+this.wndSize.scrollLeft,bottom:this.arPos.bottom+this.wndSize.scrollTop};this.arPosInner=this.div_inner.getBoundingClientRect();this.arPosInner={left:this.arPosInner.left+this.wndSize.scrollLeft,top:this.arPosInner.top+this.wndSize.scrollTop,right:this.arPosInner.right+this.wndSize.scrollLeft,bottom:this.arPosInner.bottom+this.wndSize.scrollTop}}else{this.arPos=jsUtils.GetRealPos(this.div);this.arPosInner=jsUtils.GetRealPos(this.div_inner)}document.onmouseup=window["JCPopup_stopResize"+this.suffix];jsUtils.addEvent(document,"mousemove",window["JCPopup_doResize"+this.suffix]);if(document.body.setCapture)document.body.setCapture();var e=document.body;e.ondrag=jsUtils.False;e.onselectstart=jsUtils.False;e.style.MozUserSelect=this.div.style.MozUserSelect="none";e.style.cursor=this.obResizer.style.cursor;this.HideShadow()};JCPopup.prototype.doResize=function(t){if(!t)t=window.event;var e=t.clientX+this.wndSize.scrollLeft;var i=t.clientY+this.wndSize.scrollTop;if(this.x==e&&this.y==i||e>this.wndSize.innerWidth+this.wndSize.scrollLeft-10)return;this.Resize(e,i);this.x=e;this.y=i};JCPopup.prototype.Resize=function(t,e){if(null==this.diff_x){this.diff_x=this.div.offsetWidth-this.div_inner.offsetWidth;this.diff_y=this.div.offsetHeight-this.div_inner.offsetHeight;if(this.arAdditionalResize.length>0){for(var i=0,s=this.arAdditionalResize.length;i<s;i++){if(null!=this.arAdditionalResize[i]){var n=jsUtils.IsOpera()?0:parseInt(jsUtils.GetStyleValue(this.arAdditionalResize[i],jsUtils.IsIE()?"borderLeftWidth":"border-left-width"))+parseInt(jsUtils.GetStyleValue(this.arAdditionalResize[i],jsUtils.IsIE()?"borderRightWidth":"border-right-width"));var o=jsUtils.IsOpera()||jsUtils.IsIE()?0:parseInt(jsUtils.GetStyleValue(this.arAdditionalResize[i],"border-top-width"))+parseInt(jsUtils.GetStyleValue(this.arAdditionalResize[i],"border-bottom-width"));this.arAdditionalResize[i].diff_x=this.div.offsetWidth-this.arAdditionalResize[i].offsetWidth+n;this.arAdditionalResize[i].diff_y=this.div.offsetHeight-this.arAdditionalResize[i].offsetHeight+o}}}}var r=t-this.arPos.left;var a=e-this.arPos.top;var h=r-this.div.offsetWidth;if(null!=this.obDescr)var l=this.obDescr.offsetHeight;var p=false;if(r>this.arParams.min_width){p=true;this.div.style.width=r+"px";this.div_inner.style.width=r-this.diff_x+"px"}if(null!=this.obDescr)var u=this.obDescr.offsetHeight-l;else var u=0;this.diff_y+=u;var d=false;if(a>this.arParams.min_height){d=true;this.div_inner.style.height=a-this.diff_y+"px";this.div.style.height=a+"px"}if(this.arAdditionalResize.length>0){for(var i=0,s=this.arAdditionalResize.length;i<s;i++){if(null!=this.arAdditionalResize[i]){if(d)this.arAdditionalResize[i].style.height=a-this.arAdditionalResize[i].diff_y+"px";if(p)this.arAdditionalResize[i].style.width=r-this.arAdditionalResize[i].diff_x+"px"}}}if(jsUtils.IsIE())this.AdjustShadow()};JCPopup.prototype.stopResize=function(){if(document.body.releaseCapture)document.body.releaseCapture();jsUtils.removeEvent(document,"mousemove",window["JCPopup_doResize"+this.suffix]);document.onmouseup=null;var t=document.body;t.ondrag=null;t.onselectstart=null;t.style.MozUserSelect=this.div.style.MozUserSelect="";t.style.cursor="";this.UnhideShadow();this.AdjustShadow();this.SavePosition()};JCPopup.prototype.SavePosition=function(){var t={width:parseInt(this.div.style.width),height:parseInt(this.div.style.height),iheight:parseInt(this.div_inner.style.height)};if(null!=this.error_dy)t.iheight+=this.error_dy;jsUserOptions.SaveOption("jsPopup"+this.suffix,"size_"+this.check_url,"width",t.width);jsUserOptions.SaveOption("jsPopup"+this.suffix,"size_"+this.check_url,"height",t.height);jsUserOptions.SaveOption("jsPopup"+this.suffix,"size_"+this.check_url,"iheight",t.iheight);for(var e=0,i=this.arAdditionalResize.length;e<i;e++){if(null!=this.arAdditionalResize[e]&&null!=this.arAdditionalResize[e].BXResizeCacheID){jsUserOptions.SaveOption("jsPopup"+this.suffix,"size_"+this.check_url,this.arAdditionalResize[e].BXResizeCacheID+"_height",parseInt(this.arAdditionalResize[e].style.height));jsUserOptions.SaveOption("jsPopup"+this.suffix,"size_"+this.check_url,this.arAdditionalResize[e].BXResizeCacheID+"_width",parseInt(this.arAdditionalResize[e].style.width))}}this.__arRuntimeResize[this.check_url]=t};JCPopup.prototype.IncludePrepare=function(){var t=window.frames.editor;if(null==t)return false;var e=t.document.forms.inner_form;var i=document.forms[this.form_name];if(null==e||null==i)return false;i.include_data.value=e.filesrc_pub.value;return true};JCPopup.prototype.ShowError=function(t){CloseWaitWindow();this.AllowClose();this.obDescr=document.getElementById("bx_popup_description_container"+this.suffix);if(null!=this.obDescr){var e=this.obDescr.offsetHeight;var i=document.getElementById("bx_popup_description_error"+this.suffix);if(!i){i=document.createElement("P");i.id="bx_popup_description_error"+this.suffix;this.obDescr.firstChild.appendChild(i)}i.innerHTML='<font class="errortext">'+t+"</font>";if(this.obDescr.offsetHeight!=e){this.error_dy=this.obDescr.offsetHeight-e;if(this.div_inner)this.div_inner.style.height=parseInt(jsUtils.GetStyleValue(this.div_inner,"height"))-this.error_dy+"px"}}else alert(t)};function JCComponentUtils(){}JCComponentUtils.prototype.ClearCache=function(t){CHttpRequest.Action=function(t){window.location=window.location.href};ShowWaitWindow();CHttpRequest.Send("/bitrix/admin/clear_component_cache.php?"+t)};JCComponentUtils.prototype.EnableComponent=function(t){CHttpRequest.Action=function(t){window.location=window.location.href};ShowWaitWindow();CHttpRequest.Send("/bitrix/admin/enable_component.php?"+t)};function COpacity(t){this.element=t;this.opacityProperty=this.GetOpacityProperty();this.startOpacity=null;this.finishOpacity=null;this.delay=30;this.currentOpacity=null;this.fadingTimeoutID=null}COpacity.prototype.SetElementOpacity=function(t){if(!this.opacityProperty)return false;if(this.opacityProperty=="filter"){t=t*100;var e=this.element.filters["DXImageTransform.Microsoft.alpha"]||this.element.filters.alpha;if(e)e.opacity=t;else this.element.style.filter+="progid:DXImageTransform.Microsoft.Alpha(opacity="+t+")"}else this.element.style[this.opacityProperty]=t;return true};COpacity.prototype.GetOpacityProperty=function(){var t;if(typeof document.body.style.opacity=="string")return"opacity";else if(typeof document.body.style.MozOpacity=="string")return"MozOpacity";else if(typeof document.body.style.KhtmlOpacity=="string")return"KhtmlOpacity";else if(document.body.filters&&(t=navigator.appVersion.match(/MSIE ([\d.]+)/))&&t[1]>=5.5)return"filter";return false};COpacity.prototype.Fading=function(t,e,i){if(!this.opacityProperty)return;this.startOpacity=t;this.finishOpacity=e;this.currentOpacity=this.startOpacity;if(this.fadingTimeoutID)clearInterval(this.fadingTimeoutID);var s=this;this.fadingTimeoutID=setInterval(function(){s.Run(i)},this.delay)};COpacity.prototype.Run=function(t){this.currentOpacity=Math.round((this.currentOpacity+.1*(this.finishOpacity-this.startOpacity>0?1:-1))*10)/10;this.SetElementOpacity(this.currentOpacity);if(this.currentOpacity==this.startOpacity||this.currentOpacity==this.finishOpacity){clearInterval(this.fadingTimeoutID);if(typeof t=="function")t(this)}};COpacity.prototype.Undo=function(){};var jsExtLoader={obContainer:null,obContainerInner:null,jsPopup_name:"jsPopup",url:"",httpRequest:null,httpRequest2:null,obTemporary:null,onajaxfinish:null,obFrame:null,start:function(t){this.url=t;this.obContainer=null;ShowWaitWindow();this.httpRequest=this._CreateHttpObject();this.httpRequest.onreadystatechange=jsExtLoader.stepOne;this.httpRequest.open("GET",this.url,true);this.httpRequest.send("")},startPost:function(t,e){this.url=t;this.obContainer=null;ShowWaitWindow();this.httpRequest=this._CreateHttpObject();this.httpRequest.onreadystatechange=jsExtLoader.stepOne;this.httpRequest.open("POST",this.url,true);this.httpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.httpRequest.send(e)},post:function(t){var e=document.forms[t];if(null==e)return;if(null==this.obFrame){if(jsUtils.IsIE())this.obFrame=document.createElement('<iframe src="javascript:void(0)" name="frame_'+t+'">');else{this.obFrame=document.createElement("IFRAME");this.obFrame.name="frame_"+t;this.obFrame.src="javascript:void(0)"}this.obFrame.style.display="none";document.body.appendChild(this.obFrame)}e.target=this.obFrame.name;if(e.action.length<=0)e.action=this.url;window[jsExtLoader.jsPopup_name].DenyClose();ShowWaitWindow();e.save.click();if(false===e.BXReturnValue){window[jsExtLoader.jsPopup_name].AllowClose();CloseWaitWindow()}e.BXReturnValue=true},urlencode:function(t){return escape(t).replace(new RegExp("\\+","g"),"%2B")},__prepareOnload:function(){this.obTemporary=window.onload;window.onload=null},__runOnload:function(){if(window.onload)window.onload();window.onload=this.obTemporary;this.obTemporary=null},stepOne:function(){if(jsExtLoader.httpRequest.readyState==4){var t=jsExtLoader.httpRequest.responseText;var e=[];var i;var s=new RegExp("<script([^>]*)>","i");var n=new RegExp("src=[\"']([^\"']+)[\"']","i");while((i=t.match(s))!==null){var o=t.search("<\/script>","i");if(o==-1)break;var r=i[1].indexOf("bxrunfirst")!="-1";var a;if((a=i[1].match(n))!==null)e[e.length]={bRunFirst:r,isInternal:false,JS:a[1]};else{var h=i.index+i[0].length;var l=t.substr(h,o-h);if(false&&e.length>0&&e[e.length-1].isInternal&&e[e.length-1].bRunFirst==r)e[e.length-1].JS+="\r\n\r\n"+l;else e[e.length]={bRunFirst:r,isInternal:true,JS:l}}t=t.substr(0,i.index)+t.substr(o+9)}jsExtLoader.__prepareOnload();jsExtLoader.processResult(t,e);CloseWaitWindow();jsExtLoader.__runOnload()}},EvalGlobal:function(t){if(window.execScript)window.execScript(t,"javascript");else if(jsUtils.IsSafari())window.setTimeout(t,0);else window.eval(t)},arLoadedScripts:[],__isScriptLoaded:function(t){for(var e=0;e<jsExtLoader.arLoadedScripts.length;e++)if(jsExtLoader.arLoadedScripts[e]==t)return true;return false},EvalExternal:function(t){if(/\/bitrix\/js\/main\/public_tools.js$/i.test(t))return;if(jsExtLoader.__isScriptLoaded(t))return;jsExtLoader.arLoadedScripts.push(t);if(t.substring(0,8)!="/bitrix/")t="/bitrix/admin/"+t;if(jsUtils.IsOpera()){if(null==this.httpRequest2)this.httpRequest2=this._CreateHttpObject();var e=this.httpRequest2}else{var e=this.httpRequest}e.onreadystatechange=function(t){};e.open("GET",t,false);e.send("");var i=e.responseText;e=null;try{this.EvalGlobal(i)}catch(t){}},processResult:function(t,e){jsExtLoader.processScripts(e,true);if(null==jsExtLoader.obContainer)jsExtLoader.obContainer=jsExtLoader.onajaxfinish(t);else jsExtLoader.obContainer.innerHTML=t;jsExtLoader.processScripts(e,false)},processScripts:function(t,e){for(var i=0,s=t.length;i<s;i++){if(t[i].bRunFirst!=e)continue;if(t[i].isInternal){t[i].JS=t[i].JS.replace("\x3c!--","");jsExtLoader.EvalGlobal(t[i].JS)}else{jsExtLoader.EvalExternal(t[i].JS)}}},_CreateHttpObject:function(){var t=null;if(window.XMLHttpRequest){try{t=new XMLHttpRequest}catch(t){}}else if(window.ActiveXObject){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}if(!t)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}}return t}};var jsAdminStyle={arCSS:{},bInited:false,httpRequest:null,Init:function(){var t=document.getElementsByTagName("LINK");if(t.length>0){for(var e=0;e<t.length;e++){if(t[e].href){var i=t[e].href;var s=i.indexOf("://");if(s!=-1)i=i.substr(i.indexOf("/",s+3));t[e].bxajaxflag=false;this.arCSS[i]=t[e]}}}this.bInited=true},Load:function(t){if(!this.bInited)this.Init();if(null!=this.arCSS[t]){this.arCSS[t].disabled=false;return}var e=document.createElement("STYLE");e.type="text/css";var i=document.getElementsByTagName("HEAD")[0];i.insertBefore(e,i.firstChild);if(jsUtils.IsIE()){e.styleSheet.addImport(t)}else{try{if(null==this.httpRequest)this.httpRequest=jsExtLoader._CreateHttpObject();this.httpRequest.onreadystatechange=null;this.httpRequest.open("GET",t,false);this.httpRequest.send("");var s=this.httpRequest.responseText;var n=t.lastIndexOf("/");if(n!=-1){var o=t.substring(0,n);s=s.replace(/url\(([^\/\\].*?)\)/gi,"url("+o+"/$1)")}e.appendChild(document.createTextNode(s))}catch(t){}}},Unload:function(t){if(!this.bInited)this.Init();if(null!=this.arCSS[t]){this.arCSS[t].disabled=true}},UnloadAll:function(){if(!this.bInited)this.Init();else for(var t in this.arCSS){if(this.arCSS[t].bxajaxflag)this.Unload(t)}}};if(![].pop){Array.prototype.pop=function(){if(this.length<=0)return false;var t=this[this.length-1];delete this[this.length-1];this.length--;return t};Array.prototype.shift=function(){if(this.length<=0)return false;var t=this.reverse();var e=t.pop();this.prototype=t.reverse();return e};Array.prototype.push=function(t){this[this.length]=t}}function jsWizard(){this.currentStep=null;this.firstStep=null;this.arSteps={};this.nextButtonID="btn_popup_next";this.prevButtonID="btn_popup_prev";this.finishButtonID="btn_popup_finish";this.arButtons={}}jsWizard.prototype.AddStep=function(t,e){var i=document.getElementById(t);if(!i)return;if(typeof e!="object")e={};this.arSteps[t]={element:i};for(var s in e)this.arSteps[t][s]=e[s];if(this.firstStep===null)this.firstStep=t};jsWizard.prototype.SetCurrentStep=function(t){this.currentStep=t};jsWizard.prototype.SetFirstStep=function(t){this.firstStep=t};jsWizard.prototype.SetNextButtonID=function(t){this.nextButtonID=t};jsWizard.prototype.SetPrevButtonID=function(t){this.prevButtonID=t};jsWizard.prototype.SetFinishButtonID=function(t){this.finishButtonID=t};jsWizard.prototype.SetCancelButtonID=function(t){this.cancelButtonID=t};jsWizard.prototype.SetButtonDisabled=function(t,e){if(this.arButtons[t])this.arButtons[t].disabled=e};jsWizard.prototype.IsStepExists=function(t){if(this.arSteps[t])return true;else return false};jsWizard.prototype.Display=function(){if(this.firstStep===null)return;this.currentStep=this.firstStep;var t=this;var e={next:this.nextButtonID,prev:this.prevButtonID,finish:this.finishButtonID};for(var i in e){var s=document.getElementById(e[i]);if(s&&s.tagName=="INPUT"){s.buttonID=i;s.onclick=function(){t._OnButtonClick(this.buttonID)};this.arButtons[i]=s}else this.arButtons[i]=null}this._OnStepShow()};jsWizard.prototype._OnButtonClick=function(t){if(this.arSteps[this.currentStep]){var e=this.arSteps[this.currentStep]["on"+t];if(e&&typeof e=="function"){if(e(this)===false)return}}if(!this.arSteps[this.currentStep]){if(!this.arSteps[this.firstStep])return;this.currentStep=this.firstStep}else if(this.arSteps[this.currentStep][t])this.currentStep=this.arSteps[this.currentStep][t];this._OnStepShow()};jsWizard.prototype._OnStepShow=function(){for(var t in this.arSteps)this.arSteps[t].element.style.display=t==this.currentStep?"":"none";for(var e in this.arButtons){if(this.arButtons[e]){var t=this.arSteps[this.currentStep][e];this.arButtons[e].disabled=t&&this.arSteps[t]?false:true}}if(this.arSteps[this.currentStep]){var i=this.arSteps[this.currentStep]["onshow"];if(i&&typeof i=="function")i(this)}};var jsPopup=new JCPopup;var jsComponentUtils=new JCComponentUtils;
//# sourceMappingURL=public_tools.map.js